<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ include file="/sys/include/header.jsp" %>
<%@ page import="java.util.*, com.es.common.*"%>

<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>

   <link href="sys/style01/css/table.css" rel="stylesheet" type="text/css" />
   <link href="sys/css/banzu.css" rel="stylesheet" type="text/css" />  

<script type="text/javascript">
 
function save()
{			
 
	   if(document.form1.cmn_code.value=="")
		{
				alert("请输入编码!");
		}
		else if(document.form1.cmn_value.value==""){
			alert("请输入名称");
			}else
		{
			document.form1.submit();
		}
		
}

function returns()
{
	document.form2.submit();
}

</script>


 <link href="sys/style01/css/table.css" rel="stylesheet" type="text/css">
 </HEAD>

 <BODY class="ridgeBody">

<% 
	String common_id = "";
	String item_id = request.getParameter("changeitem_id");
	if(request.getParameter("common_id") != null)
		common_id = request.getParameter("common_id");
    if(request.getAttribute("common_id") != null)
    	common_id = (String)request.getAttribute("common_id");
		
	CommonBiz cmnBiz = new CommonBiz();
	CommonBean cmnBean = cmnBiz.getCommonById(common_id);
%>
 
<form name="form1" method="post" action="jsp/common/commonmodify.action?changeitem_id=<%=item_id%>">
  <input type="hidden" name="common_id" value="<%=cmnBean.getCommonId()%>">
<table class=datatable width=50% cellpadding='0' cellspacing='0' border='1' bordercolorDark='white' bordercolorLight='#BEBEBE' >
      <!--DWLayoutTable-->
      <tr >
        <TD height="28" colspan="2"  class="dataTitle">修改信息</TD>
    </tr>      
      <tr>
        <TD width=30% height="22" valign="top" nowrap class="datatr1"> 编码<font color="#FF0000">*</font>：</TD>	
	<TD valign="top" nowrap > 
	      <input name="cmn_code" type="text" class="input" value="<%=cmnBean.getCommonCode() %>"/> 	</TD>
 	 </tr>
 	 
 	  <tr>
        <TD width=30% height="22" valign="top" nowrap class="datatr1"> 名称<font color="#FF0000">*</font>：</TD>	
	<TD valign="top" nowrap > 
	      <input name="cmn_value" type="text" class="input" value="<%=cmnBean.getCommonValue() %>"/> 	</TD>
 	 </tr>
      
      <tr >
        <TD height="21" colspan="2" valign="top" class="dataTitle">  <input type="button" name="Submit1" value="保存" onClick="save()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

       <input type="button" name="Submit1" value="返回" onClick="returns()"/> </TD>
  	 </tr>

        <%	
        if(request.getAttribute("message")!=null)
        {
        	String message=request.getAttribute("message").toString();
        %>
     	 
     	 <tr>
     	   <td height="2" colspan="4" valign="top"><%=message%></td>

   	   </tr>
     	 
     	 
  		 <%}%>
  </TABLE>
</form>

<form name="form2" method="post" action="jsp/common/commonsearch.action?changeitem_id=<%=item_id%>">
</form>
 </BODY>
</HTML>